package com.mengtian_tech.tju.dataquery.api.controller;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.mengtian_tech.tju.dataquery.api.model.ClientType;
import com.mengtian_tech.tju.dataquery.api.util.SessionUtil;

/**
 * PC端入口
 * @author wxd56
 *
 */
@Controller
@RequestMapping("/pc")
public class PCController {

	@RequestMapping("")
	public void index(HttpSession session,HttpServletResponse resp) throws IOException {
		
		//设置会话的类型，方便统一认证后跳转到对应地址
		SessionUtil.setClientType(ClientType.CLIENT_WEB);
		
		//跳转服务器首页，统一认证自动拦截，如果没有登录，则跳转登录，否则直接返回PC端页面
		resp.sendRedirect("/");
	}
	
}
